/*
 *	CompanyInfo.h
 *
 * 	Copyright (C) 2011 Aaron Huang
 * 	This file is part of StackPainter.
 *
 * 	StackPainter is free software: you can redistribute it and/or modify
 * 	it under the terms of the GNU General Public License as published by
 * 	the Free Software Foundation, either version 3 of the License, or
 * 	(at your option) any later version.
 *
 * 	StackPainter is distributed in the hope that it will be useful,
 * 	but WITHOUT ANY WARRANTY; without even the implied warranty of
 * 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * 	GNU General Public License for more details.
 *
 * 	You should have received a copy of the GNU General Public License
 * 	along with StackPainter.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef COMPANYINFO_H_
#define COMPANYINFO_H_

#include <QMap>
#include <QString>
#include <string>

using std::string;

class CompanyInfo {
public:
	CompanyInfo(int num, QString name, int year, double EPS);

	virtual ~CompanyInfo();

	int getNum() const;

	QString getName() const;

	const QMap<int, double>* getEPSs() const;

	void addEPS(int year, double EPS) throw(QString);

	bool isListedOver(int year) const;

	bool isEPSAscending() const;

	string toStdString() const;

private:
	int _num;
	QString _name;
	QMap<int, double> _EPSs;
};

#endif /* COMPANYINFO_H_ */
